﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Serialization;

namespace Rss.Domain.ValueObject
{
    [XmlType("rss")]
    public class Rss
    {

        /// <summary>
        /// 
        /// </summary>
        [XmlElement("channel")]
        public Channel channel { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public class Channel
        {
            /// <summary>
            /// 
            /// </summary>
            public string title { get; set; }

            /// <summary>
            /// 
            /// </summary>
            public string link { get; set; }

            /// <summary>
            /// 
            /// </summary>
            public string description { get; set; }

            /// <summary>
            /// 
            /// </summary>
            //[XmlArray("item")]
            [XmlElement("item")]
            public List<Item> items { get; set; }
        }

        /// <summary>
        /// 
        /// </summary>
        public class Item
        {
            /// <summary>
            /// 
            /// </summary>
            public string title { get; set; }

            /// <summary>
            /// 
            /// </summary>
            public string link { get; set; }

            /// <summary>
            /// 
            /// </summary>
            public string category { get; set; }

            /// <summary>
            /// 
            /// </summary>
            public string description { get; set; }

            /// <summary>
            /// 
            /// </summary>
            public string pubDate { get; set; }
        }
    }


}
